package com.example.system.service;

import com.example.system.entity.DO.ExamQuestionDO;
import com.example.system.entity.VO.QuestionVO;

import java.util.List;

public interface IExamQuestionService {
    /**
     * 批量添加题目
     * @param examQuestionList examQuestionList
     * @return true:成功 false:失败
     */
    boolean saveQuestion(List<ExamQuestionDO> examQuestionList);

    /**
     * 去除竞赛中重复的题目
     * @param examId examId
     * @param questionIds questionIds
     * @return list<去重后的题目id>
     */
    List<Long> removeDuplication(Long examId, List<Long> questionIds);

    /**
     * 查询竞赛中的题目
     * @param examId examId
     * @return
     */
    List<QuestionVO> selectExamQuestionList(Long examId);

    /**
     * 删除竞赛中的题目
     * @param examId examId
     * @param questionId questionId
     * @return 1.成功 0.失败
     */
    int questionDelete(Long examId, Long questionId);

    /**
     * 删除竞赛
     * @param examId examId
     */
    void deleteByExamId(Long examId);

    /**
     * 查询竞赛中题目的数量
     * @param examId examId
     * @return Long
     */
    Long selectQuestionCount(Long examId);
}
